import { marker as T } from '@biesbjerg/ngx-translate-extract-marker';

export enum Role {
  SshRead = 'SSH_READ',
  SshWrite = 'SSH_WRITE',
  AlertRead = 'ALERT_READ',
  AlertWrite = 'ALERT_WRITE',
  BootEnvRead = 'BOOT_ENV_READ',
  BootEnvWrite = 'BOOT_ENV_WRITE',
  DiskRead = 'DISK_READ',
  DiskWrite = 'DISK_WRITE',
  DockerRead = 'DOCKER_READ',
  NetworkGeneralWrite = 'NETWORK_GENERAL_WRITE',
  SystemCronRead = 'SYSTEM_CRON_READ',
  SystemCronWrite = 'SYSTEM_CRON_WRITE',
  SystemSecurityRead = 'SYSTEM_SECURITY_READ',
  SystemSecurityWrite = 'SYSTEM_SECURITY_WRITE',
  SystemTunableRead = 'SYSTEM_TUNABLE_READ',
  SystemTunableWrite = 'SYSTEM_TUNABLE_WRITE',
  SystemUpdateRead = 'SYSTEM_UPDATE_READ',
  SystemUpdateWrite = 'SYSTEM_UPDATE_WRITE',
  TrueNasConnectRead = 'TRUENAS_CONNECT_READ',
  TrueNasConnectWrite = 'TRUENAS_CONNECT_WRITE',
  ApiKeyWrite = 'API_KEY_WRITE',
  ApiKeyRead = 'API_KEY_READ',
  PrivilegeWrite = 'PRIVILEGE_WRITE',
  PrivilegeRead = 'PRIVILEGE_READ',
  TrueCommandRead = 'TRUECOMMAND_READ',
  TrueCommandWrite = 'TRUECOMMAND_WRITE',
  AccountRead = 'ACCOUNT_READ',
  AccountWrite = 'ACCOUNT_WRITE',
  AlertListRead = 'ALERT_LIST_READ',
  AlertListWrite = 'ALERT_LIST_WRITE',
  AuthSessionsRead = 'AUTH_SESSIONS_READ',
  AuthSessionsWrite = 'AUTH_SESSIONS_WRITE',
  CloudBackupRead = 'CLOUD_BACKUP_READ',
  CloudBackupWrite = 'CLOUD_BACKUP_WRITE',
  CloudSyncRead = 'CLOUD_SYNC_READ',
  CloudSyncWrite = 'CLOUD_SYNC_WRITE',
  DatasetDelete = 'DATASET_DELETE',
  DatasetRead = 'DATASET_READ',
  DatasetWrite = 'DATASET_WRITE',
  EnclosureRead = 'ENCLOSURE_READ',
  EnclosureWrite = 'ENCLOSURE_WRITE',
  FilesystemAttrsRead = 'FILESYSTEM_ATTRS_READ',
  FilesystemAttrsWrite = 'FILESYSTEM_ATTRS_WRITE',
  FilesystemDataRead = 'FILESYSTEM_DATA_READ',
  FilesystemDataWrite = 'FILESYSTEM_DATA_WRITE',
  FilesystemFullControl = 'FILESYSTEM_FULL_CONTROL',
  FullAdmin = 'FULL_ADMIN',
  HasAllowList = 'HAS_ALLOW_LIST',
  KeychainCredentialRead = 'KEYCHAIN_CREDENTIAL_READ',
  KeychainCredentialWrite = 'KEYCHAIN_CREDENTIAL_WRITE',
  KmipRead = 'KMIP_READ',
  KmipWrite = 'KMIP_WRITE',
  LocalAdministrator = 'LOCAL_ADMINISTRATOR',
  NetworkGeneralRead = 'NETWORK_GENERAL_READ',
  NetworkInterfaceRead = 'NETWORK_INTERFACE_READ',
  NetworkInterfaceWrite = 'NETWORK_INTERFACE_WRITE',
  ReadonlyAdmin = 'READONLY_ADMIN',
  ReplicationAdmin = 'REPLICATION_ADMIN',
  ReplicationTaskConfigRead = 'REPLICATION_TASK_CONFIG_READ',
  ReplicationTaskConfigWrite = 'REPLICATION_TASK_CONFIG_WRITE',
  ReplicationTaskRead = 'REPLICATION_TASK_READ',
  ReplicationTaskWrite = 'REPLICATION_TASK_WRITE',
  ReplicationTaskWritePull = 'REPLICATION_TASK_WRITE_PULL',
  ReportingRead = 'REPORTING_READ',
  ReportingWrite = 'REPORTING_WRITE',
  ServiceRead = 'SERVICE_READ',
  ServiceWrite = 'SERVICE_WRITE',
  SharingIscsiAuthRead = 'SHARING_ISCSI_AUTH_READ',
  SharingIscsiAuthWrite = 'SHARING_ISCSI_AUTH_WRITE',
  SharingIscsiExtentRead = 'SHARING_ISCSI_EXTENT_READ',
  SharingIscsiExtentWrite = 'SHARING_ISCSI_EXTENT_WRITE',
  SharingIscsiGlobalRead = 'SHARING_ISCSI_GLOBAL_READ',
  SharingIscsiGlobalWrite = 'SHARING_ISCSI_GLOBAL_WRITE',
  SharingIscsiHostRead = 'SHARING_ISCSI_HOST_READ',
  SharingIscsiHostWrite = 'SHARING_ISCSI_HOST_WRITE',
  SharingIscsiInitiatorRead = 'SHARING_ISCSI_INITIATOR_READ',
  SharingIscsiInitiatorWrite = 'SHARING_ISCSI_INITIATOR_WRITE',
  SharingIscsiPortalRead = 'SHARING_ISCSI_PORTAL_READ',
  SharingIscsiPortalWrite = 'SHARING_ISCSI_PORTAL_WRITE',
  SharingIscsiRead = 'SHARING_ISCSI_READ',
  SharingIscsiTargetExtentRead = 'SHARING_ISCSI_TARGETEXTENT_READ',
  SharingIscsiTargetExtentWrite = 'SHARING_ISCSI_TARGETEXTENT_WRITE',
  SharingIscsiTargetRead = 'SHARING_ISCSI_TARGET_READ',
  SharingIscsiTargetWrite = 'SHARING_ISCSI_TARGET_WRITE',
  SharingIscsiWrite = 'SHARING_ISCSI_WRITE',
  SharingNvmeTargetRead = 'SHARING_NVME_TARGET_READ',
  SharingNvmeTargetWrite = 'SHARING_NVME_TARGET_WRITE',
  SharingFtpRead = 'SHARING_FTP_READ',
  SharingFtpWrite = 'SHARING_FTP_WRITE',
  SharingAdmin = 'SHARING_ADMIN',
  SharingNfsRead = 'SHARING_NFS_READ',
  SharingNfsWrite = 'SHARING_NFS_WRITE',
  SharingRead = 'SHARING_READ',
  SharingSmbRead = 'SHARING_SMB_READ',
  SharingSmbWrite = 'SHARING_SMB_WRITE',
  SharingWrite = 'SHARING_WRITE',
  SnapshotDelete = 'SNAPSHOT_DELETE',
  SnapshotRead = 'SNAPSHOT_READ',
  SnapshotTaskRead = 'SNAPSHOT_TASK_READ',
  SnapshotTaskWrite = 'SNAPSHOT_TASK_WRITE',
  SnapshotWrite = 'SNAPSHOT_WRITE',
  SupportRead = 'SUPPORT_READ',
  SupportWrite = 'SUPPORT_WRITE',
  SystemAuditRead = 'SYSTEM_AUDIT_READ',
  SystemAuditWrite = 'SYSTEM_AUDIT_WRITE',
  SystemGeneralRead = 'SYSTEM_GENERAL_READ',
  SystemGeneralWrite = 'SYSTEM_GENERAL_WRITE',
  SystemAdvancedRead = 'SYSTEM_ADVANCED_READ',
  SystemAdvancedWrite = 'SYSTEM_ADVANCED_WRITE',
  AppsRead = 'APPS_READ',
  AppsWrite = 'APPS_WRITE',
  CatalogRead = 'CATALOG_READ',
  CatalogWrite = 'CATALOG_WRITE',
  CertificateAuthorityRead = 'CERTIFICATE_AUTHORITY_READ',
  CertificateAuthorityWrite = 'CERTIFICATE_AUTHORITY_WRITE',
  CertificateRead = 'CERTIFICATE_READ',
  CertificateWrite = 'CERTIFICATE_WRITE',
  ContainerRead = 'CONTAINER_READ',
  ContainerWrite = 'CONTAINER_WRITE',
  FailoverRead = 'FAILOVER_READ',
  FailoverWrite = 'FAILOVER_WRITE',
  IpmiRead = 'IPMI_READ',
  IpmiWrite = 'IPMI_WRITE',
  JbofRead = 'JBOF_READ',
  JbofWrite = 'JBOF_WRITE',
  PoolScrubRead = 'POOL_SCRUB_READ',
  PoolScrubWrite = 'POOL_SCRUB_WRITE',
  PoolRead = 'POOL_READ',
  PoolWrite = 'POOL_WRITE',
  VirtImageRead = 'VIRT_IMAGE_READ',
  VirtImageWrite = 'VIRT_IMAGE_WRITE',
  VirtInstanceRead = 'VIRT_INSTANCE_READ',
  VirtInstanceWrite = 'VIRT_INSTANCE_WRITE',
  VirtInstanceDelete = 'VIRT_INSTANCE_DELETE',
  VirtGlobalRead = 'VIRT_GLOBAL_READ',
  VirtGlobalWrite = 'VIRT_GLOBAL_WRITE',
  VmDeviceRead = 'VM_DEVICE_READ',
  VmDeviceWrite = 'VM_DEVICE_WRITE',
  VmRead = 'VM_READ',
  VmWrite = 'VM_WRITE',
  DirectoryServiceRead = 'DIRECTORY_SERVICE_READ',
  DirectoryServiceWrite = 'DIRECTORY_SERVICE_WRITE',
  DockerWrite = 'DOCKER_WRITE',
}

export const roleNames = new Map<Role, string>([
  [Role.SshRead, T('SSH Read')],
  [Role.SshWrite, T('SSH Write')],
  [Role.AlertRead, T('Alert Read')],
  [Role.AlertWrite, T('Alert Write')],
  [Role.BootEnvRead, T('Boot Environment Read')],
  [Role.BootEnvWrite, T('Boot Environment Write')],
  [Role.DiskRead, T('Disk Read')],
  [Role.DiskWrite, T('Disk Write')],
  [Role.DockerRead, T('Docker Read')],
  [Role.NetworkGeneralWrite, T('Network General Write')],
  [Role.SystemCronRead, T('System Cron Read')],
  [Role.SystemCronWrite, T('System Cron Write')],
  [Role.SystemSecurityRead, T('System Security Read')],
  [Role.SystemSecurityWrite, T('System Security Write')],
  [Role.SystemTunableRead, T('System Tunable Read')],
  [Role.SystemTunableWrite, T('System Tunable Write')],
  [Role.SystemUpdateRead, T('System Update Read')],
  [Role.SystemUpdateWrite, T('System Update Write')],
  [Role.TrueNasConnectRead, T('TrueNAS Connect Read')],
  [Role.TrueNasConnectWrite, T('TrueNAS Connect Write')],
  [Role.PrivilegeWrite, T('Privilege Write')],
  [Role.PrivilegeRead, T('Privilege Read')],
  [Role.ApiKeyRead, T('API Key Read')],
  [Role.ApiKeyWrite, T('API Key Write')],
  [Role.TrueCommandRead, T('TrueCommand Read')],
  [Role.TrueCommandWrite, T('TrueCommand Write')],
  [Role.AlertListRead, T('Alert List Read')],
  [Role.AlertListWrite, T('Alert List Write')],
  [Role.AuthSessionsRead, T('Auth Sessions Read')],
  [Role.AuthSessionsWrite, T('Auth Sessions Write')],
  [Role.DatasetDelete, T('Dataset Delete')],
  [Role.DatasetRead, T('Dataset Read')],
  [Role.DatasetWrite, T('Dataset Write')],
  [Role.CloudBackupRead, T('Cloud Backup Read')],
  [Role.CloudBackupWrite, T('Cloud Backup Write')],
  [Role.FilesystemAttrsRead, T('Filesystem Attrs Read')],
  [Role.FilesystemAttrsWrite, T('Filesystem Attrs Write')],
  [Role.FilesystemDataRead, T('Filesystem Data Read')],
  [Role.FilesystemDataWrite, T('Filesystem Data Write')],
  [Role.FilesystemFullControl, T('Filesystem Full Control')],
  [Role.FullAdmin, T('Full Admin')],
  [Role.HasAllowList, T('Has Allow List')],
  [Role.LocalAdministrator, T('Local Administrator')],
  [Role.KeychainCredentialRead, T('Keychain Credential Read')],
  [Role.KeychainCredentialWrite, T('Keychain Credential Write')],
  [Role.NetworkGeneralRead, T('Network General Read')],
  [Role.NetworkInterfaceRead, T('Network Interface Read')],
  [Role.NetworkInterfaceWrite, T('Network Interface Write')],
  [Role.ReadonlyAdmin, T('Readonly Admin')],
  [Role.ReplicationAdmin, T('Replication Admin')],
  [Role.ReplicationTaskConfigRead, T('Replication Task Config Read')],
  [Role.ReplicationTaskConfigWrite, T('Replication Task Config Write')],
  [Role.ReplicationTaskRead, T('Replication Task Read')],
  [Role.ReplicationTaskWrite, T('Replication Task Write')],
  [Role.ReplicationTaskWritePull, T('Replication Task Write Pull')],
  [Role.SharingIscsiAuthRead, T('Sharing iSCSI Auth Read')],
  [Role.SharingIscsiAuthWrite, T('Sharing iSCSI Auth Write')],
  [Role.SharingIscsiExtentRead, T('Sharing iSCSI Extent Read')],
  [Role.SharingIscsiExtentWrite, T('Sharing iSCSI Extent Write')],
  [Role.SharingIscsiGlobalRead, T('Sharing iSCSI Global Read')],
  [Role.SharingIscsiGlobalWrite, T('Sharing iSCSI Global Write')],
  [Role.SharingIscsiHostRead, T('Sharing iSCSI Host Read')],
  [Role.SharingIscsiHostWrite, T('Sharing iSCSI Host Write')],
  [Role.SharingIscsiInitiatorRead, T('Sharing iSCSI Initiator Read')],
  [Role.SharingIscsiInitiatorWrite, T('Sharing iSCSI Initiator Write')],
  [Role.SharingIscsiPortalRead, T('Sharing iSCSI Portal Read')],
  [Role.SharingIscsiPortalWrite, T('Sharing iSCSI Portal Write')],
  [Role.SharingIscsiRead, T('Sharing iSCSI Read')],
  [Role.SharingIscsiTargetExtentRead, T('Sharing iSCSI Target Extent Read')],
  [Role.SharingIscsiTargetExtentWrite, T('Sharing iSCSI Target Extent Write')],
  [Role.SharingIscsiTargetRead, T('Sharing iSCSI Target Read')],
  [Role.SharingIscsiTargetWrite, T('Sharing iSCSI Target Write')],
  [Role.SharingIscsiWrite, T('Sharing iSCSI Write')],
  [Role.SharingNvmeTargetRead, T('Sharing NVMe-oF Target Read')],
  [Role.SharingNvmeTargetWrite, T('Sharing NVMe-oF Target Write')],
  [Role.SharingFtpRead, T('Sharing FTP Read')],
  [Role.SharingFtpWrite, T('Sharing FTP Write')],
  [Role.SharingAdmin, T('Sharing Admin')],
  [Role.SharingNfsRead, T('Sharing NFS Read')],
  [Role.SharingNfsWrite, T('Sharing NFS Write')],
  [Role.SharingRead, T('Sharing Read')],
  [Role.SharingSmbRead, T('Sharing SMB Read')],
  [Role.SharingSmbWrite, T('Sharing SMB Write')],
  [Role.SharingWrite, T('Sharing Write')],
  [Role.SnapshotDelete, T('Snapshot Delete')],
  [Role.SnapshotRead, T('Snapshot Read')],
  [Role.SnapshotTaskRead, T('Snapshot Task Read')],
  [Role.SnapshotTaskWrite, T('Snapshot Task Write')],
  [Role.SnapshotWrite, T('Snapshot Write')],
  [Role.AuthSessionsRead, T('Auth Sessions Read')],
  [Role.AuthSessionsWrite, T('Auth Sessions Write')],
  [Role.ReportingRead, T('Reporting Read')],
  [Role.AccountRead, T('Account Read')],
  [Role.AccountWrite, T('Account Write')],
  [Role.CloudSyncRead, T('Cloud Sync Read')],
  [Role.CloudSyncWrite, T('Cloud Sync Write')],
  [Role.EnclosureRead, T('Enclosure Read')],
  [Role.EnclosureWrite, T('Enclosure Write')],
  [Role.KmipRead, T('KMIP Read')],
  [Role.KmipWrite, T('KMIP Write')],
  [Role.ReportingRead, T('Reporting Read')],
  [Role.ReportingWrite, T('Reporting Write')],
  [Role.ServiceRead, T('Service Read')],
  [Role.ServiceWrite, T('Service Write')],
  [Role.SystemGeneralRead, T('System General Read')],
  [Role.SystemGeneralWrite, T('System General Write')],
  [Role.SystemAdvancedRead, T('System Advanced Read')],
  [Role.SystemAdvancedWrite, T('System Advanced Write')],
  [Role.SupportRead, T('Support Read')],
  [Role.SupportWrite, T('Support Write')],
  [Role.SystemAuditRead, T('System Audit Read')],
  [Role.SystemAuditWrite, T('System Audit Write')],
  [Role.AppsRead, T('Apps Read')],
  [Role.AppsWrite, T('Apps Write')],
  [Role.CatalogRead, T('Catalog Read')],
  [Role.CatalogWrite, T('Catalog Write')],
  [Role.CertificateAuthorityRead, T('Certificate Authority Read')],
  [Role.CertificateAuthorityWrite, T('Certificate Authority Write')],
  [Role.CertificateRead, T('Certificate Read')],
  [Role.CertificateWrite, T('Certificate Write')],
  [Role.ContainerRead, T('Container Read')],
  [Role.ContainerWrite, T('Container Write')],
  [Role.FailoverRead, T('Failover Read')],
  [Role.FailoverWrite, T('Failover Write')],
  [Role.IpmiRead, T('IPMI Read')],
  [Role.IpmiWrite, T('IPMI Write')],
  [Role.JbofRead, T('JBOF Read')],
  [Role.JbofWrite, T('JBOF Write')],
  [Role.PoolScrubRead, T('Pool Scrub Read')],
  [Role.PoolScrubWrite, T('Pool Scrub Write')],
  [Role.PoolRead, T('Pool Read')],
  [Role.PoolWrite, T('Pool Write')],
  [Role.VirtImageRead, T('Virtualization Image Read')],
  [Role.VirtImageWrite, T('Virtualization Image Write')],
  [Role.VirtInstanceRead, T('Virtualization Instance Read')],
  [Role.VirtInstanceWrite, T('Virtualization Instance Write')],
  [Role.VirtInstanceDelete, T('Virtualization Instance Delete')],
  [Role.VirtGlobalWrite, T('Virtualization Global Write')],
  [Role.VirtGlobalRead, T('Virtualization Global Read')],
  [Role.VmDeviceRead, T('VM Device Read')],
  [Role.VmDeviceWrite, T('VM Device Write')],
  [Role.VmRead, T('VM Read')],
  [Role.VmWrite, T('VM Write')],
  [Role.DirectoryServiceRead, T('Directory Service Read')],
  [Role.DirectoryServiceWrite, T('Directory Service Write')],
  [Role.DockerWrite, T('Docker Write')],
]);
